/* tslint:disable */
/* eslint-disable */
/**
 * Admin.NET 通用权限开发平台
 * 让 .NET 开发更简单、更通用、更流行。整合最新技术，模块插件式开发，前后端分离，开箱即用。<br/><u><b><font color='FF0000'> 👮不得利用本项目从事危害国家安全、扰乱社会秩序、侵犯他人合法权益等法律法规禁止的活动！任何基于本项目二次开发而产生的一切法律纠纷和责任，我们不承担任何责任！</font></b></u>
 *
 * OpenAPI spec version: 1.0.0
 * 
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */
import { BASE_PATH, COLLECTION_FORMATS, RequestArgs, BaseAPI, RequiredError } from '../base';
import globalAxios, { AxiosResponse, AxiosInstance, AxiosRequestConfig } from 'axios';
import { Configuration } from '../configuration';
import { EntranceAndexitPageInput } from '../models/entranceandexit -page-input';

import { DeleteEntranceAndexit,  EntranceAndexitInput } from '../models/entranceandexit -input';
import { AdminResultEntranceAndexit } from '../models/result-pagelist-entranceqndexit';
import { serveConfig } from '../../utils/axios-utils';

// Some imports not used depending on template conditions
// @ts-ignore


/**
 * SysWechatUserApi - axios parameter creator
 * @exports
 */
    export const EntranceApiAxiosParamCreator = function (configuration?: Configuration) {
    return {
        /**
         * 获取出入口
         */
        apiEntrancePagePost: async (body?: EntranceAndexitPageInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/entranceAndexit/GetentranceAndexitPageList`;
            const localVarUrlObj = new URL(localVarPath, 'https://example.com');
            let baseOptions;
            if (configuration) {
                baseOptions = configuration.baseOptions;
            }
            const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options };
            const localVarHeaderParameter = {} as any;

            // 添加认证
            if (configuration && configuration.accessToken) {
                const accessToken = typeof configuration.accessToken === 'function'
                    ? await configuration.accessToken()
                    : await configuration.accessToken;
                localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
            }

            localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
            localVarRequestOptions.headers = { ...localVarHeaderParameter, ...options.headers };
            localVarRequestOptions.data = JSON.stringify(body || {});

            return {
                url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
                options: localVarRequestOptions,
            };
        },

        /**
         * 增加出入口
        */
        apiEntranceAddPost: async (body?: EntranceAndexitInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/entranceAndexit/entranceAndexitAdd`;
            const localVarUrlObj = new URL(localVarPath, serveConfig.basePath);

           

                let baseOptions;
                if (configuration) {
                    baseOptions = configuration.baseOptions;
                }
                const localVarRequestOptions: AxiosRequestConfig = { method: 'POST', ...baseOptions, ...options };
                const localVarHeaderParameter = {} as any;
                // 添加认证
                if (configuration && configuration.accessToken) {
                    const accessToken = typeof configuration.accessToken === 'function'
                        ? await configuration.accessToken()
                        : await configuration.accessToken;
                    localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;
                }
                localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
                localVarRequestOptions.headers = { ...localVarHeaderParameter, ...options.headers };
                localVarRequestOptions.data = JSON.stringify(body || {});
                return {
                    url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
                    options: localVarRequestOptions,
                };
            
        },

        /**
         * 修改出入口
         */
        apiEntranceUpdatePost: async (body?: EntranceAndexitInput, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/entranceAndexit/entranceAndexitUpdate`;
            const localVarUrlObj = new URL(localVarPath, serveConfig.basePath);

            
                let baseOptions;
                if (configuration) {
                    baseOptions = configuration.baseOptions;
             };
                const localVarRequestOptions: AxiosRequestConfig = { method: 'POST',...baseOptions,...options };
                const localVarHeaderParameter = {} as any;
                // 添加认证
                if (configuration && configuration.accessToken) {
                    const accessToken = typeof configuration.accessToken === 'function'
                       ? await configuration.accessToken()
                        : await configuration.accessToken;
                    localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;

                }  
                localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
                localVarRequestOptions.headers = {...localVarHeaderParameter,...options.headers };
                localVarRequestOptions.data = JSON.stringify(body || {});
                return {
                    url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
                    options: localVarRequestOptions,
                };
            
        },

        /**
         * 删除出入口
         */
         apiEntranceDeletePost: async (body?: DeleteEntranceAndexit, options: AxiosRequestConfig = {}): Promise<RequestArgs> => {
            const localVarPath = `/api/entranceAndexit/EntranceAndexitDelete`;
            const localVarUrlObj = new URL(localVarPath, serveConfig.basePath);

         
                let baseOptions;
                if (configuration) {
                    baseOptions = configuration.baseOptions;
             };
                const localVarRequestOptions: AxiosRequestConfig = { method: 'POST',...baseOptions,...options };
                const localVarHeaderParameter = {} as any;
                // 添加认证
                if (configuration && configuration.accessToken) {
                    const accessToken = typeof configuration.accessToken === 'function'
                      ? await configuration.accessToken()
                        : await configuration.accessToken;
                    localVarHeaderParameter["Authorization"] = "Bearer " + accessToken;

           
                 };
                localVarHeaderParameter['Content-Type'] = 'application/json-patch+json';
                localVarRequestOptions.headers = {...localVarHeaderParameter,...options.headers };
                localVarRequestOptions.data = JSON.stringify(body || {});
                return {
                    url: localVarUrlObj.pathname + localVarUrlObj.search + localVarUrlObj.hash,
                    options: localVarRequestOptions,
                };
        
            
        },
    };
    }
/**
 * 
 * @param configuration 
 * @returns 
 */
    export const apiEntranceApiFp = function (configuration?: Configuration) {
        return {
            /**
             * 获取出入口
             */
            async apiEntrancePagePost(
                body?: EntranceAndexitPageInput,
                options?: AxiosRequestConfig
            ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<AdminResultEntranceAndexit>>> {
                const localVarAxiosArgs = await EntranceApiAxiosParamCreator(configuration).apiEntrancePagePost(body, options);
                return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                    const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url };
                    return axios.request(axiosRequestArgs);
                };
            },

            /**
             * 增加出入口
             */
            async apiEntranceAddPost(
                body?: EntranceAndexitInput,
                options?: AxiosRequestConfig
            ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
                const localVarAxiosArgs = await EntranceApiAxiosParamCreator(configuration).apiEntranceAddPost(body, options);
                return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                    const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url };
                    return axios.request(axiosRequestArgs);
                };
            },

        /**
         * 修改出入口
         */        async apiEntranceUpdatePost(
                body?: EntranceAndexitInput,
                options?: AxiosRequestConfig
            ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
                const localVarAxiosArgs = await EntranceApiAxiosParamCreator(configuration).apiEntranceUpdatePost(body, options);
                return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                    const axiosRequestArgs: AxiosRequestConfig = { ...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url };
                    return axios.request(axiosRequestArgs);
                };
            },

        /**
         * 删除出入口
         * 
         * 
         */        async apiEntranceDeletePost(
                id?: DeleteEntranceAndexit,
                options?: AxiosRequestConfig
            ): Promise<(axios?: AxiosInstance, basePath?: string) => Promise<AxiosResponse<void>>> {
                const localVarAxiosArgs = await EntranceApiAxiosParamCreator(configuration).apiEntranceDeletePost(id, options);
                return (axios: AxiosInstance = globalAxios, basePath: string = BASE_PATH) => {
                    const axiosRequestArgs: AxiosRequestConfig = {...localVarAxiosArgs.options, url: basePath + localVarAxiosArgs.url };
                    return axios.request(axiosRequestArgs);
                };
            },


            // ... existing code ...



        };
    };
    /**
     * EntranceApi - object-oriented interface
     * @export
     * @class EntranceApi
     * @extends {BaseAPI}
     */
    export class EntranceApi extends BaseAPI {
        /**
         * 
         * @summary 获取出入口
         * @param {EntranceAndexitPageInput} [body] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         * @memberof EntranceApi
         */
        public async apiEntrancePagePost(body?: EntranceAndexitPageInput, options?: AxiosRequestConfig): Promise<AxiosResponse<AdminResultEntranceAndexit>> {
            return apiEntranceApiFp(this.configuration).apiEntrancePagePost(body, options).then((request) => request(this.axios, this.basePath));
        }

        /**
         * 
         * @summary 增加出入口
         * @param {EntranceAndexitInput} [body] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         * @memberof EntranceApi
         */
        public async apiEntranceAddPost(body?: EntranceAndexitInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
            return apiEntranceApiFp(this.configuration).apiEntranceAddPost(body, options).then((request) => request(this.axios, this.basePath));
        }

        /**
         * 
         * @summary 修改出入口
         * @param {EntranceAndexitInput} [body] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         * @memberof EntranceApi
         */
        public async apiEntranceUpdatePost(body?: EntranceAndexitInput, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
            return apiEntranceApiFp(this.configuration).apiEntranceUpdatePost(body, options).then((request) => request(this.axios, this.basePath));
        }

        /**
         * 
         * @summary 删除出入口
         * @param {DeleteEntranceAndexitInput} [body] 
         * @param {*} [options] Override http request option.
         * @throws {RequiredError}
         * @memberof EntranceApi
         */
        public async apiEntranceDeletePost(body?: DeleteEntranceAndexit, options?: AxiosRequestConfig): Promise<AxiosResponse<void>> {
            return apiEntranceApiFp(this.configuration).apiEntranceDeletePost(body, options).then((request) => request(this.axios, this.basePath));
        }
    }

const BaseUrl=(window as any).__env__.VITE_API_URL
import { axiosInstance } from '/@/utils/axios-utils' 
interface ResponseDate<T=any>{
  code:string,
  message:string,
  result:T
}

/**
 * 导出
 * @param data 导出所需参数
 * @returns 导出文件的响应
 */
export function EntranceexportApi(data:any,responseType: 'blob',)
{
// 根据调用方式修改请求配置，添加 responseType 为 'blob'
return axiosInstance<Blob>({
  responseType: 'blob',
    url: BaseUrl+'/api/entranceAndexit/EntranceAndexitExport',
    method: 'POST',
    data
  })
}

/** 
 * 导入文件操作
 * @param file 导入的文件对象
 * @returns 导入文件操作的响应结果
 */
export function EntranceinportApi(formData:any) {
    return axiosInstance<ResponseDate>({
      //responseType: 'blob',
      url: BaseUrl + '/api/entranceAndexit/ImportEntranceAndexit',
      method: 'POST',
      data: formData
    });
  }


    /** 
 * 下载接口
 * @param data 下载所需参数
 * @returns 下载文件的响应
 */
export function DownloaEntranceApi(params?: Record<string, any>)  {
    return axiosInstance<Blob>({
      responseType: 'blob',
      url: BaseUrl + '/api/entranceAndexit/DownloadEntranceAndexit',
      method: 'GET',
      params
    });
  }
     /** 
 * 批量删除
 * @param data 删除idlist
 * @returns 下载文件的响应
 */
export function batchDeleteEntranceApi(data:DeleteEntranceAndexit[])  {
    return axiosInstance<ResponseDate>({
     // responseType: 'blob',
      url: BaseUrl + '/api/entranceAndexit/BatchDeleteEntranceAndexit',
      method: 'Delete',
      data
    });
  }

  